import http from '@/utils/http'
import {DeptPageParams,DeptAdd} from './deptModel'
enum Api{
  deptPageSize='/department/page',
  deptAdd = '/department/save',
  deptUpDate='/department/update',
  deptDelete = '/department/remove'
}
/***
 * 部门删除
 */
export const departmentRemoveApi = async (id)=>{
  return http.delete(Api.deptDelete,id)
}
/**
 * 部门编辑
 */
export const departmentUpdateApi=async (params:DeptAdd)=>{
  return http.post(Api.deptUpDate,params)
}
/**
 * 部门新增
 */
export const departmentSaveApi=async (params:DeptAdd)=>{
  return http.post(Api.deptAdd,params)
}
/**
 * 
 * @param params 部门列表
 * @returns 
 */
export const departmentPageApi=async (params:DeptPageParams)=>{
  return http.get(Api.deptPageSize,params)
}